class Solution:
    def decodeMessage(self, key: str, message: str) -> str:
        map_dict = {' ': ' '}
        count = 0
        for c in key:
            if not(c in map_dict):
                map_dict[c] = chr(ord('a')+count)
                count += 1

        result = ''
        for c in message:
            result += map_dict[c]

        # result = "".join(map_dict.get(c, " ") for c in message)

        return result


print(Solution().decodeMessage(
    "the quick brown fox jumps over the lazy dog", "vkbs bs t suepuv"))
